<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>角色权限添加</title>
    <!-- 引入 layui.css -->
    <link rel="stylesheet" href="//unpkg.com/layui@2.6.8/dist/css/layui.css">
</head>
<body>

    <form class="layui-form" action="{:url('save')}" method="post" id="commentForm">


        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">角色名</label>
                <div class="layui-input-inline">
                    <select name="role_id">
                        {foreach $role as $v}
                        <option value="{$v.id}">{$v.rolename}</option>
                        {/foreach}
                    </select>
                </div>
            </div>
        </div>



        <div class="layui-form">
            <table class="layui-table">
                <colgroup>
                    <col width="150">
                    <col width="150">
                    <col width="200">
                    <col>
                </colgroup>
                <thead>
                {foreach $data as $v}
                <tr>



                    <th>
                        {if $v.pid!=0}
                        <input type="checkbox" name="node_id[]" lay-skin="primary" value="{$v.id}">

                        {/if}
                        {$v.n_name}
                    </th>

                </tr>
                {/foreach}
                </thead>
            </table>
        </div>


        <button type="submit" class="layui-btn layui-btn-primary layui-border-green">提交</button>

</form>
</body>
</html>
<!-- 引入 layui.js -->
<script src="//unpkg.com/layui@2.6.8/dist/layui.js"></script>